<include file="Public/header" />
<script>
$(function(){
	$('#sync_btn').click(function(){
		var obj = this;
        $.post("{:U('sync_member')}",{},function(data){
            if(data.status=='1'){
                note_info(data.info,obj);
                setTimeout("location.reload()",800);
            }else{
                note_info(data.info,obj,'warn');
            }
        });
	});
});
</script>
    <div class="comm-top">
    	<include file="Member/nav" act_nav="member"/>
        <div class="title-left">用户列表</div>
        <div class="title-right" style="top:8px;">
        <form method="get" action="{:U('index')}">
            <input name="keywords" class="textarea search_inp" placeholder="请输入 关键词" type="text" value="{:I('get.keywords')}"/>
            <input value="搜索" class="btn btn-success search_btn" type="submit" />
        </form>
        </div>
    </div>
    <div class="list-table">
        <div class="wrapper">
            <table class="stable">
                <thead>
                    <tr>
<!--                         <th><label style="cursor:pointer;"><input type="checkbox" name="checkall"/> </label></th> -->
                        <th>头像</th>
                        <th>昵称</th>
                        <th>性别</th>
                        <th>积分值</th>
                        <th>关注状态</th>
                        <th>加入时间</th>
                        <th>详情</th>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="list" item="vo">
                        <tr>
<!--                         	<td><input type="checkbox" name="dataobj" value="{$vo.fromuser}"/></td> -->
                            <td class="img_td"><div style="background:url('{$vo.headimgurl}') no-repeat center;background-size:cover;"></div></td>
                            <td>{$vo.nickname|default='--'}</td>
                            <td>{$vo['sex']=='1'?'男':'女'}</td>
                            <td>{$vo.have_cent|default='0'} <span>（<span onclick="location.href='{:U('User/cent_log',array('user_id'=>$vo['id']))}'" class="c-green">明细</span>）</span></td>
                            <if condition="$vo.status eq '1'">
                                <td class="sticTd"><span class="staAct">已关注</span></td>
                            <else />
                                <td class="sticTd"><span class="staNot">未关注</span></td>
                            </if>
                            <td>{$vo.create_date|substr=0,16}</td>
                            <td><div class="btn-operate">
                                <a href="javascript:void(0);" onclick="view_detail('{$vo.id}')" title="查看详情"><i class="glyphicon glyphicon-eye-open"></i></a>
                            </div></td>
                        </tr>
                    </foreach>
                </tbody>
            </table>
        </div>
    </div>
    <div class="page-list">{$page}</div>
    <script>
    $(function(){
    	$('input[name=checkall]').click(function(){
    		if($(this).prop('checked')){
    			$('input[name=dataobj]').prop('checked',true);
    		}else{
    			$('input[name=dataobj]').prop('checked',false);
    		}
    	});
    })
    function move_group(group_id,obj){
    	if(group_id==null || group_id=='')return false;
    	var data = [];
    	$('input[name=dataobj]').each(function(){
    		if($(this).prop('checked'))data.push($(this).val());
    	});
    	if(data.length<1)return false;
        var obj = obj;
    	$.post(
    		"{:U('move_group')}",
    		{openids:data,group_id:group_id},
    		function(res){
    			if(res.status=='1'){
    				note_info(res.info,obj);
    				setTimeout("location.reload()",1000);
    			}else{
    				note_info(res.info,obj,'warn');
    			}
    		}
    	);
    }
    function view_detail(id){
    	if(id==null || id=='')return false;
    	$.post(
    		"{:U('user_detail')}",
    		{id:id},
    		function(data){
    			dialog(data,'信息详情');
    		}
    	);
    }
    </script>
<include file="Public/dialog"/>
<include file="Public/footer" />